﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Survey.Models.Where
{
    public interface IEFWhere<T> where T : class
    {
        public int? Page {  get; set; }  
        public int? Limit {  get; set; }
        public IQueryable<T> Process(IQueryable<T> query,out int count);
        public IQueryable<T> Process(DbSet<T> dbSet, out int count)
        {
            IQueryable<T> query = dbSet.Where(x => true);
            return this.Process(query, out count);
        }
    }
}
